Repository navigation
feat(checkout): CHECKOUT-10448 Improve Billing Address Options for Multi-shipping - #3454
Conversation
|
cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit de6cbc9. Configure here.
richapatel1510
left a comment
There was a problem hiding this comment.
Could you update the description to match the smaller scope relating only multi address shipping? Also, the rollout section says registered shoppers only, but its available guests too, also only on enhanced checkout
| const rawBillingAddresses = | ||
| isGuest && isPayPalFastlaneEnabled ? paypalFastlaneAddresses : customer.addresses; | ||
|
|
||
| const billingAddresses = rawBillingAddresses.map((address) => |
There was a problem hiding this comment.
Do we need a separate hook for this? The form already has isUsingMultiShipping, customer, config and cart, so I think we could just add consignments to the existing selector and do something like:
const consignmentAddresses =
isUsingMultiShipping && !hasCompanyAddressBook && !hasFastlaneAddresses
? uniqWith(
consignments.map(({ shippingAddress }) => omit(shippingAddress, 'email')),
isEqualAddress,
)
.filter((a) => !baseAddresses.some((b) => isEqualAddress(a, b)))
.map((a, i) => ({ ...a, id: -(i + 1), type: 'residential' }))
: [];
const billingAddresses = [...baseAddresses, ...consignmentAddresses];
If needed we can create a helper getConsignmentAddressOptions to get the consignment addresses as option
There was a problem hiding this comment.
Corrected the description.
Updated the solution as suggested.
One more thing, B2C signed-in customers always have consignment addresses in the billing dropdown because we save a new address when creating a consignment.
02d9cac
| const isAddressSelectVisible = hasAddresses && !shouldRenderStaticAddress; | ||
| const shouldShowAddressForm = | ||
| !restrictManualAddressEntry && | ||
| !hasValidCustomerAddress && | ||
| (!isAddressSelectVisible || isEnteringNewAddress || !!billingAddress?.address1); |
There was a problem hiding this comment.
Have we tested how it works for single shipping now, looks like it will hide the billing form for single shipping address as well when billing is not same as shipping
There was a problem hiding this comment.
Yes, the single shipping works as expected. !isAddressSelectVisible is true in this case.
Screen.Recording.2026-11-10.at.16.54.21.mov
| const customerAddresses = customer?.addresses; | ||
| const isPayPalFastlaneGuest = !!customer?.isGuest && isPayPalFastlaneEnabled; | ||
| const hasPayPalFastlaneAddresses = isPayPalFastlaneGuest && paypalFastlaneAddresses.length > 0; | ||
| const isMultiShippingEnabled = !!config?.checkoutSettings.hasMultiShippingEnabled; |
There was a problem hiding this comment.
Do we need the hasMultiShippingEnabled check? If the order actually ships to multiple addresses, the store must have multi-shipping enabled anyway.
There was a problem hiding this comment.
You are right, checking this is indeed unnecessary. Removed.
| const consignmentAddresses = | ||
| shouldIncludeConsignmentAddresses && consignments | ||
| ? getConsignmentAddressOptions(consignments, baseAddresses).map((address) => | ||
| decodeAddressLabel(address, hasAddressLabel), | ||
| ) | ||
| : []; | ||
| const billingAddresses = [ | ||
| ...baseAddresses.map((address) => decodeAddressLabel(address, hasAddressLabel)), | ||
| ...consignmentAddresses, | ||
| ]; |
There was a problem hiding this comment.
| const consignmentAddresses = | |
| shouldIncludeConsignmentAddresses && consignments | |
| ? getConsignmentAddressOptions(consignments, baseAddresses).map((address) => | |
| decodeAddressLabel(address, hasAddressLabel), | |
| ) | |
| : []; | |
| const billingAddresses = [ | |
| ...baseAddresses.map((address) => decodeAddressLabel(address, hasAddressLabel)), | |
| ...consignmentAddresses, | |
| ]; | |
| const consignmentAddresses = | |
| shouldIncludeConsignmentAddresses && consignments | |
| ? getConsignmentAddressOptions(consignments, baseAddresses) | |
| : []; | |
| const billingAddresses = [ | |
| ...baseAddresses, | |
| ...consignmentAddresses, | |
| ].map((address) => decodeAddressLabel(address, hasAddressLabel)); |
💅
|
checkout-js deployed to Integration US |
|
checkout-js deployed to Staging US |
⚡️ Lighthouse results🖥️ Desktop:
📱 Mobile:
|
|
checkout-js deployed to Production US |

What/Why?
When using multi-shipping in the enhanced theme, the billing address dropdown lists consignment addresses, so:
This feature is only available to:
and not available to:
Rollout/Rollback
No experiment. Roll back by reverting this commit.
New experiments
N/A
Testing
Guest checkout in the enhanced theme sees the newly entered address in the billing address dropdown
Screen.Recording.2026-11-10.at.15.07.53.mov
Guest checkout in the classic theme does not see this feature
B2B customer does not see this feature
Screen.Recording.2026-11-09.at.13.03.36.mov
Note
Medium Risk
Touches checkout billing address selection and persistence for multi-shipping and guest/Fastlane edge cases, where incorrect options or payload shaping could block or mis-assign billing.
Overview
Multi-shipping billing now merges consignment shipping addresses into the billing address picker (via
getConsignmentAddressOptions), so B2C shoppers can choose a ship-to address or enter a new one. Consignment options are skipped for B2B company address books and for PayPal Fastlane guests who already have Fastlane addresses; selecting a consignment address strips placeholderid/typebefore persistence.The billing step UI is tightened: when there is no valid saved billing address, the dropdown shows an “Enter or select an address” placeholder and hides the form until the shopper picks Add new, selects an option, or fails validation on submit (which then reveals the fields). A new locale string backs the placeholder.
Coverage adds unit tests for consignment option building and a large address book suite on
PaymentBillingForm(multi-ship, guest, Fastlane, B2B).Reviewed by Cursor Bugbot for commit cac906e. Bugbot is set up for automated code reviews on this repo. Configure here.